﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using MyHotel_DTO;
using MyHotel_DAO;

namespace MyHotel_DAOWS
{
    /// <summary>
    /// Summary description for LoaiPhongDAOWS
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    // [System.Web.Script.Services.ScriptService]
    public class LoaiPhongDAOWS : System.Web.Services.WebService
    {

        [WebMethod]
        public List<LoaiPhong> getList()
        {
            
            return new LoaiPhongDAO().getList();
        }

        [WebMethod]
        public bool themLoaiPhong(LoaiPhong loaiphong)
        {
            return new LoaiPhongDAO().themLoaiPhong(loaiphong);
        }

        [WebMethod]
        public LoaiPhong getLoaiPhongbyMaLoai(int maloai)
        {
            return new LoaiPhongDAO().getLoaiPhongbyMaLoai(maloai);
        }

         [WebMethod]
        public LoaiPhong getLoaiPhongbyTenPhong(string tenphong)
        {
            return new LoaiPhongDAO().getLoaiPhongbyTenPhong(tenphong);
        }

        [WebMethod]
        public int getMaxDonGia()
        {
            return new LoaiPhongDAO().getMaxDonGia();
        }
        [WebMethod]
        public int getMinDonGia()
        {
            return new LoaiPhongDAO().getMinDonGia();
        }

        [WebMethod]
        public bool capNhatLoaiPhong(LoaiPhong loaiphong)
        {
            return new LoaiPhongDAO().capNhatLoaiPhong(loaiphong);
        }

        [WebMethod]
        public bool xoaLoaiPhong(LoaiPhong loaiphong)
        {
            return new LoaiPhongDAO().xoaLoaiPhong(loaiphong);
        }

         [WebMethod]
        public bool CheckLoaiPhongByTenLoai(string tenloai)
        {
            return new LoaiPhongDAO().CheckLoaiPhongByTenLoai(tenloai);
        }

        [WebMethod]
        public bool CheckLoaiPhongByMaLoai(int maloai)
        {
            return new LoaiPhongDAO().CheckLoaiPhongByMaLoai(maloai);
        }

        [WebMethod]
        public bool CheckPhongByMaLoai(int maloai)
        {
            return new LoaiPhongDAO().CheckPhongByMaLoai(maloai);
        }

        [WebMethod]
        public bool CheckLoaiPhongByTenLoai_MaLoai(string tenloai, int maloai)
        {
            return new LoaiPhongDAO().CheckLoaiPhongByTenLoai_MaLoai(tenloai, maloai);
        }
    }
}
